package com.workManager.actListener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.apache.log4j.Logger;

import java.util.Map;

/**
 * Created by Thinkpad on 2017/2/15 0015.
 */
public class HumanResourceExamListener implements JavaDelegate{

    private Logger logger = Logger.getLogger(HumanResourceExamListener.class.getName());
    public void execute(DelegateExecution delegateExecution) throws Exception {

        logger.info("开始触发工作流，检测开发考试--------------------------------------");
        Map<String,Object> variables = delegateExecution.getVariables();
        String result = variables.get("result").toString();
        logger.info("开发知识面试结果："+result);
        logger.info("开始人事面试----");
        delegateExecution.setVariable("result","开发通过-----");
        logger.info("人事面试完毕-------等待通知----");
    }
}
